#include <stdio.h>

int My_strlen(char * num)
{
    int i = 0;
    while (*num)
    {
        num++;
        i++;
    }
    return i;
}

int main(int argc, char const *argv[])
{
    printf("请输入需测量的字符串：");
    char num[128] = "";
    scanf("%s",num);
    printf("%d\n",My_strlen(num));
    return 0;
}
